@echo off

echo Syncing Maxsi Distribution Server from Apache Directory...

set OutputDir=..
set MDSVR=%OutputDir%\Maxsi Distribution Server
set INPUTSVR=C:\Sortie_dev\distribution

rmdir /S /Q "%MDSVR%\"
mkdir "%MDSVR%"
mkdir "%MDSVR%\addons"
mkdir "%MDSVR%\scripts"
mkdir "%MDSVR%\Licenses"
copy "%INPUTSVR%\index.php" "%MDSVR%\index.php"
copy "%INPUTSVR%\Licenses\MD-License.txt" "%MDSVR%\Licenses\MD-License.txt"
xcopy "%INPUTSVR%\addons" "%MDSVR%\addons" /C /E
del "%MDSVR%\addons\shared\database_password.php"

echo Maxsi Distribution Server has been synced.

pause